package coy.learning;

import java.util.Date;

/**
 * This is a basic java Object. It has data or "state" in the form of variables and behavior in the form of methods.
 * @author WhoCares
 *
 */
public class Dog {

	// -- BELOW IS STATE/DATA. NOTICE THAT THE DATA IS ALL 'PRIVATE.' MEANING THAT TO USE THE DATA WE MUST PROVIDE PUBLIC
	// -- BEHAVIORS OR METHODS THAT ALLOW USERS OF THIS OBJECT ACCESS TO CHANGE OR READ THE VALUE.
	private String breed;
	private String name;
	private String color;
	private Date birthDate;
	
	// -- END OF STATE/DATA
	
	// -- REAL WORLD BEHAVIORS THIS OBJECT MIGHT BE ABLE TO DO --
	
	/**
	 * Tell the dog to speak. This will print the dog's name followed by it barking to the console.<br/>
	 * If there is no name, the message will tell the user that they need to name the dog.
	 */
	public void speak() {
		if(name==null || name.trim().length()==0) {
			System.out.println("This dog doesn't want to bark because you didn't bother to name it!");
		} else {
			System.out.println(name + " says WOOF!!");
		}
	}
	
	// -- END OF REAL WORLD BEHAVIORS
	
	
	// -- BELOW ARE SETTERS AND GETTERS. THEY ALLOW 'USERS' OF THIS OBJECT TO MODIFY THE INTERNAL DATA/STATE, OR GET THE VALUES --
	public String getBreed() {
		return breed;
	}

	public void setBreed(String breed) {
		this.breed = breed;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
